package com.student.xujiang.myallstudent.rxjava.rxjava2;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.student.xujiang.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class RxJava2MainActivity extends AppCompatActivity {

    @BindView(R.id.bt_rx2_create)
    Button btRx2Create;
    @BindView(R.id.bt_rx2_just)
    Button btRx2Just;
    @BindView(R.id.bt_rx2_map)
    Button btRx2Map;
    @BindView(R.id.bt_rx2_map2)
    Button btRx2Map2;
    @BindView(R.id.activity_rx_java2_main)
    LinearLayout activityRxJava2Main;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rx_java2_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.bt_rx2_create, R.id.bt_rx2_just, R.id.bt_rx2_map, R.id.bt_rx2_map2})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.bt_rx2_create:
                RxUtils2.createFlowable();
                break;
            case R.id.bt_rx2_just:
                RxUtils2.just();
                break;
            case R.id.bt_rx2_map:
                RxUtils2.map();
                break;
            case R.id.bt_rx2_map2:
                RxUtils2.map2();
                break;
        }
    }
}
